export const deviceList = [
  {
    id: 1,
    name: "zpw2000",
    children: [
      {
        id: 10,
        name: "2345AG"
      },
      {
        id: 11,
        name: "2345BG"
      },
      {
        id: 12,
        name: "2345CG"
      }
    ]
  },
  {
    id: 2,
    name: "25hz"
  }
];
export const featureList = [
  { id: 1, name: "功出电压" },
  { id: 2, name: "功出电流" },
  { id: 3, name: "送端电缆侧电压" },
  { id: 4, name: "送端电缆侧电流" },
  { id: 5, name: "受端电缆侧主轨电压" },
  { id: 6, name: "受端电缆侧小轨电压" },
  { id: 7, name: "轨入" },
  { id: 8, name: "受端设备侧小轨电压" },
  { id: 9, name: "轨出1" },
  { id: 10, name: "轨出2" },
  { id: 11, name: "主轨继电器" },
  { id: 12, name: "小轨继电器" }
];
export const generateDate = () => {
  return deviceList.map(device => {
    if (device.children && device.children.length > 0) {
      return device.children.map(children => {
        const childrenFeatureList = featureList;
        childrenFeatureList.map(item => {
          item.value = Math.random() * 30;
        });
        return childrenFeatureList;
      });
    }
  });
};
